﻿#----------------------------------------
# Overview
#----------------------------------------
XX means the first set of 2 digits of the map
YY means the second set of 2 digits of the map
ZZ means the third set of 2 digits of the map

For m60_ maps, the XX is 10

#----------------------------------------
# Adding a Door
#----------------------------------------
Base flag is the Door EntityID.

# Asset: Door
ModelName:              <model id>              # AEG219_000
EntityID:               <valid id>              # 10001560

# ObjAct: 
EventID:                <unique id>
EntityID:               0
Unk14:                  0
MapID:                  -1
UnkE0C:                 255
UnkS04:                 0
UnkS08:                 0
UnkS0C:                 -1
ObjActEntityID:         <base flag + 2000>      # 10003560
ObjActPartName:         <ModelName>             # Asset: Door name
ObjActID:               <ObjActParam>           # 219000 is one-way, 219001 is two-way
StateType:              1
EventFlagID:            <base flag + 7000>    # 10008560 

# Emevd: only needed for 1-way doors.
# InitializeCommonEvent(0, 90005511, 10000560, 10001560, 10003560, 219000, 0);

InitializeCommonEvent(
    0, 
    90005511, 
    10000560, # Unique flag (base flag - 1000)
    10001560, # Door EntityID
    10003560, # ObjAct EntityID
    219000,   # ObjAct Param ID
    0         # 0 disables shut, 1 allows open and shut
);

#----------
# Reference
#----------
StateType
    0
    1 Door: Two-Way
    2 
    2
    4 Door: One-Way
    
EventFlagID: 
    holds the state of the object, i.e. open, closed, etc
    For a door, ON means it is open, OFF means it is closed